package com.inboyu.admin.domain;

/**
 * 业务标识
 * @param code
 * @param title
 */
public record BusinessType(String code, String title) {

    public static final BusinessType CONTRACT = new BusinessType("CONTRACT", "合同");

    public void check() {
        if (code == null && title == null) {
            throw new IllegalArgumentException("code and title cannot be null");
        }

    }
}
